package com.molichuxing.gateway.bff.car.services;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.gateway.bff.basic.entity.response.VehicleModlemakeVo;
import com.molichuxing.gateway.bff.car.entity.request.create.MaintenanceConfigCreateVo;
import com.molichuxing.gateway.bff.car.entity.request.create.MaintenanceLogCreateVo;
import com.molichuxing.gateway.bff.car.entity.request.modify.MaintenanceConfigModifyVo;
import com.molichuxing.gateway.bff.car.entity.request.modify.MaintenanceLogModifyVo;
import com.molichuxing.gateway.bff.car.entity.response.MaintenanceBizVo;
import com.molichuxing.gateway.bff.car.entity.response.MaintenanceConfigVo;
import com.molichuxing.gateway.bff.car.entity.response.MaintenanceDetailVo;
import com.molichuxing.gateway.bff.car.entity.response.MaintenanceRecordVo;

import java.util.List;
import java.util.Map;

/**
 * 保养BFF
 *
 * @author xuelin yi
 */
public interface MaintenanceBffService {

    /**
     * 根据条件分页查询保养信息
     * type 保养类别：1-待保养，0-待审核，8-审核记录
     * licencePlate 车牌
     * vin 车架号
     * totalStartMileage    已行驶开始里程
     * totalEndMileage    已行驶结束里程
     * maintainableStartDate   开始保养时间
     * maintainableEndDate   结束保养时间
     * purchaseStartDate  采购开始时间
     * purchaseEndDate    采购结束时间
     * checkStartDate  审核开始时间
     * checkEndDate    审核结束时间
     * examineStatus   审核状态 3-审核通过，4-审核驳回
     *
     * @param mapParam
     * @param pageNum
     * @param pageSize
     * @return
     */
    public Paged<MaintenanceBizVo> getMaintenancePage(Map<String, Object> mapParam, Integer pageNum, Integer pageSize) throws Exception;


    /**
     * 根据车辆id获取保养记录
     *
     * @param carId
     * @return
     */
    public List<MaintenanceRecordVo> getMaintenanceByCarId(Integer carId) throws Exception;


    /**
     * 根据主键id获取保养记录
     *
     * @param id
     * @return
     */
    public MaintenanceDetailVo getMaintenanceById(Integer id) throws Exception;

    /**
     * 根据主键id获取保养记录
     *
     * @param id
     * @return
     */
    public MaintenanceRecordVo getMaintenanceRecordById(Integer recordId) throws Exception;

    /**
     * 创建保养历史信息
     *
     * @param maintenanceLogCreateVo
     * @return
     */
    Boolean createMaintenanceLog(MaintenanceLogCreateVo maintenanceLogCreateVo) throws Exception;

    /**
     * 审核保养信息
     *
     * @param modifyVo
     * @return
     */
    int modifyMaintenanceCheck(MaintenanceLogModifyVo modifyVo) throws Exception;


    /**
     * 分页
     *
     * @param map
     * @param pageNum
     * @param pageSize
     * @return
     */
    Paged<MaintenanceConfigVo> getMaintenanceConfigPage(Map<String, Object> map, Integer pageNum, Integer pageSize);

    /**
     * 根据id查询保养配置
     *
     * @param id
     * @return
     */
    public MaintenanceConfigVo getMaintenanceConfig(Integer id);

    /**
     * 添加
     *
     * @param dto
     * @return
     */
    public Boolean createMaintenanceConfig(MaintenanceConfigCreateVo dto);

    /**
     * 修改
     *
     * @param dto
     * @return
     */
    public Boolean modifyMaintenanceConfig(MaintenanceConfigModifyVo dto);



}
